package com.zrrd.learn.chapter04;

/**
 * 卷子
 *
 * @author asus
 * @version 1.0
 * @date 2023/5/20 9:21
 */
public class HomeWork1 {
    public static void main(String[] args) {
        int sum = 0;
        int index = 0;
        //5元
        for (int i = 0,five=5; i < five; i++) {
            //总面值
            sum = i*5;
            if(sum==20){
                index++;
                continue;
            }
            //2元
            for (int i1 = 0,second=11; i1 < second; i1++) {

                //总数20
                if((sum+i1*2)==20){
                    index++;
                    continue;
                }
                //1元
                for (int i2 = 1,one=21; i2 <one; i2++) {
                    //总数20
                    if(sum+i1*2+i2==20){
                        index++;
                        break;
                    }
                }
            }
        }
        System.out.println(index);
    }
}

//双色球 3 6 1 30
//1-5 210






